nonlinux_utime
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sun, 18 Nov 2018 21:36:29 +0000 (21:36 +0000)
committerDmitry Shachnev <mitya57@debian.org>
Sun, 18 Nov 2018 21:36:29 +0000 (21:36 +0000)
Gbp-Pq: Name nonlinux_utime.diff

qmake/library/ioutils.cpp
src/corelib/io/qfilesystemengine_unix.cpp

index fd84dff59d613bf5c8c2b7bccd3b5a823f7e0c01..3db298a24cc8ab9f5d59c7262bd13b3e171352da 100644 (file)
@@ -222,7 +222,7 @@ bool IoUtils::touchFile(const QString &targetFileName, const QString &referenceF
         *errorString = fL1S("Cannot stat() reference file %1: %2.").arg(referenceFileName, fL1S(strerror(errno)));
         return false;
     }
-#    if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L
+#    if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L && defined(UTIME_NOW)
     const struct timespec times[2] = { { 0, UTIME_NOW }, st.st_mtim };
     const bool utimeError = utimensat(AT_FDCWD, targetFileName.toLocal8Bit().constData(), times, 0) < 0;
 #    else
index deb4a9f220f3ec57472afcfd9e00bb66433e1b0d..5afe47008f355649d5375cc1171fbedf55091870 100644 (file)
@@ -1439,7 +1439,7 @@ bool QFileSystemEngine::setFileTime(int fd, const QDateTime &newDate, QAbstractF
         return false;
     }
 
-#if QT_CONFIG(futimens)
+#if QT_CONFIG(futimens) && defined(UTIME_OMIT)
     struct timespec ts[2];
 
     ts[0].tv_sec = ts[1].tv_sec = 0;